function registerComponents() {
  const modules: RecordRaw = import.meta.glob('./*.vue', { eager: true })
  const map: RecordRaw = {}

  Object.keys(modules).forEach((file) => {
    const moduleName = file.replace('./', '').replace('.vue', '')
    map[moduleName] = modules[file].default
  })

  return map
}

export default registerComponents()
